home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Online / SpeakFreely / src / gsm / inc / gsm.h < prev    next >
C/C++ Source or Header  |  2000-05-18  |  2KB  |  80 lines

  1. /*
  2.  * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
  3.  * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
  4.  * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
  5.  */
  6.  
  7. /*$Header: /home/kbs/jutta/src/gsm/gsm-1.0/inc/RCS/gsm.h,v 1.4 1993/01/29 20:07:38 jutta Exp $*/
  8.  
  9. #ifndef GSM_H
  10. #define GSM_H
  11.  
  12. #ifdef __cplusplus
  13. #       define  NeedFunctionPrototypes  1
  14. #endif
  15.  
  16. #if __STDC__
  17. #       define  NeedFunctionPrototypes  1
  18. #endif
  19.  
  20. #ifdef _NO_PROTO
  21. #       undef   NeedFunctionPrototypes
  22. #endif
  23.  
  24. #undef  GSM_P   /* gnu stdio.h actually defines this...         */
  25.  
  26. #if NeedFunctionPrototypes
  27. #       define  GSM_P( protos ) protos
  28. #else
  29. #       define  GSM_P( protos ) ( /* protos */ )
  30. #endif
  31.  
  32. #ifdef NeedFunctionPrototypes
  33. #   include     <stdio.h>               /* for FILE *   */
  34. #endif
  35.  
  36. /* AUTO_SPARC_HACK added by John Walker.  If defined, USE_FLOAT_MUL   
  37.    automatically set when compiling on a Sparc.  This lets most
  38.    people avoid editing the Makefile. */
  39.  
  40. #ifdef AUTO_SPARC_HACK
  41. #ifdef sparc
  42. #define USE_FLOAT_MUL
  43. #define FAST
  44. #endif
  45. #endif
  46.  
  47. /*
  48.  *      Interface
  49.  */
  50.  
  51. typedef struct gsm_state *      gsm;
  52. typedef short                   gsm_signal;             /* signed 16 bit */
  53. typedef unsigned char           gsm_byte;
  54. typedef gsm_byte                gsm_frame[33];          /* 33 * 8 bits   */
  55.  
  56. #define GSM_MAGIC       0xD                             /* 13 kbit/s RPE-LTP */
  57.  
  58. #define GSM_PATCHLEVEL  2
  59. #define GSM_MINOR       0
  60. #define GSM_MAJOR       1
  61.  
  62. #define GSM_OPT_VERBOSE 1
  63. #define GSM_OPT_FAST    2
  64.  
  65. extern gsm  gsm_create  GSM_P((void));
  66. extern void gsm_destroy GSM_P((gsm));   
  67.  
  68. extern int  gsm_print   GSM_P((FILE *, gsm, gsm_byte  *));
  69. extern int  gsm_option  GSM_P((gsm, int, int *));
  70.  
  71. extern void gsm_encode  GSM_P((gsm, gsm_signal *, gsm_byte  *));
  72. extern int  gsm_decode  GSM_P((gsm, gsm_byte   *, gsm_signal *));
  73.  
  74. extern int  gsm_explode GSM_P((gsm, gsm_byte   *, gsm_signal *));
  75. extern void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte   *));
  76.  
  77. #undef  GSM_P
  78.  
  79. #endif  /* GSM_H */
  80.